<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>opennars: nars.inference.TruthFunctions.revision</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">opennars
   &#160;<span id="projectnumber">1.5.5</span>
   </div>
   <div id="projectbrief">1.5-ish</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="../../namespaces.html"><span>Packages</span></a></li>
      <li><a href="../../annotated.html"><span>Classes</span></a></li>
      <li><a href="../../files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('d1/d58/classnars_1_1inference_1_1TruthFunctions_a22620614c797410623291399bae01a0b.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="contents">
<a class="anchor" id="a22620614c797410623291399bae01a0b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> nars.inference.TruthFunctions.revision </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a>&#160;</td>
          <td class="paramname"><em>v1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a>&#160;</td>
          <td class="paramname"><em>v2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">package</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>{&lt;S ==&gt; P&gt;, &lt;S ==&gt; P&gt;} |- &lt;S ==&gt; P&gt; </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">v1</td><td>Truth value of the first premise </td></tr>
    <tr><td class="paramname">v2</td><td>Truth value of the second premise </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Truth value of the conclusion </dd></dl>

<p>Definition at line <a class="el" href="../../df/d29/TruthFunctions_8java_source.html#l00085">85</a> of file <a class="el" href="../../df/d29/TruthFunctions_8java_source.html">TruthFunctions.java</a>.</p>

<p>References <a class="el" href="../../db/d95/UtilityFunctions_8java_source.html#l00096">nars.inference.UtilityFunctions.c2w()</a>, <a class="el" href="../../de/de7/TruthValue_8java_source.html#l00069">nars.entity.TruthValue.getConfidence()</a>, <a class="el" href="../../de/de7/TruthValue_8java_source.html#l00061">nars.entity.TruthValue.getFrequency()</a>, and <a class="el" href="../../db/d95/UtilityFunctions_8java_source.html#l00087">nars.inference.UtilityFunctions.w2c()</a>.</p>

<p>Referenced by <a class="el" href="../../d0/db7/LocalRules_8java_source.html#l00093">nars.inference.LocalRules.revision()</a>.</p>
<div class="fragment"><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;                                                             {</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;        <span class="keywordtype">float</span> f1 = v1.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61.html#a9eac33f2495441c77911a8581a5bbe61">getFrequency</a>();</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;        <span class="keywordtype">float</span> f2 = v2.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61.html#a9eac33f2495441c77911a8581a5bbe61">getFrequency</a>();</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;        <span class="keywordtype">float</span> c1 = v1.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">getConfidence</a>();</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;        <span class="keywordtype">float</span> c2 = v2.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">getConfidence</a>();</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;        <span class="keywordtype">float</span> w1 = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a2020576689d5aebb96d6915150cc7b9d.html#a2020576689d5aebb96d6915150cc7b9d">c2w</a>(c1);</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;        <span class="keywordtype">float</span> w2 = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a2020576689d5aebb96d6915150cc7b9d.html#a2020576689d5aebb96d6915150cc7b9d">c2w</a>(c2);</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;        <span class="keywordtype">float</span> w = w1 + w2;</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;        <span class="keywordtype">float</span> f = (w1 * f1 + w2 * f2) / w;</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;        <span class="keywordtype">float</span> c = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a957a91e3b91d4a4043c3959838c370f2.html#a957a91e3b91d4a4043c3959838c370f2">w2c</a>(w);</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a>(f, c);</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    }</div>
<div class="ttc" id="classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61_html_a9eac33f2495441c77911a8581a5bbe61"><div class="ttname"><a href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61.html#a9eac33f2495441c77911a8581a5bbe61">nars.entity.TruthValue.getFrequency</a></div><div class="ttdeci">float getFrequency()</div><div class="ttdoc">Get the frequency value. </div><div class="ttdef"><b>Definition:</b> <a href="../../de/de7/TruthValue_8java_source.html#l00061">TruthValue.java:61</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1UtilityFunctions_a2020576689d5aebb96d6915150cc7b9d_html_a2020576689d5aebb96d6915150cc7b9d"><div class="ttname"><a href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a2020576689d5aebb96d6915150cc7b9d.html#a2020576689d5aebb96d6915150cc7b9d">nars.inference.UtilityFunctions.c2w</a></div><div class="ttdeci">static float c2w(float c)</div><div class="ttdoc">A function to convert confidence to weight. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d95/UtilityFunctions_8java_source.html#l00096">UtilityFunctions.java:96</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1TruthValue_html"><div class="ttname"><a href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">nars.entity.TruthValue</a></div><div class="ttdoc">Frequency and confidence. </div><div class="ttdef"><b>Definition:</b> <a href="../../de/de7/TruthValue_8java_source.html#l00028">TruthValue.java:28</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1UtilityFunctions_a957a91e3b91d4a4043c3959838c370f2_html_a957a91e3b91d4a4043c3959838c370f2"><div class="ttname"><a href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a957a91e3b91d4a4043c3959838c370f2.html#a957a91e3b91d4a4043c3959838c370f2">nars.inference.UtilityFunctions.w2c</a></div><div class="ttdeci">static float w2c(float w)</div><div class="ttdoc">A function to convert weight to confidence. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d95/UtilityFunctions_8java_source.html#l00087">UtilityFunctions.java:87</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c_html_a68ca7d92e9ea20d2a9a9f578ad7b681c"><div class="ttname"><a href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">nars.entity.TruthValue.getConfidence</a></div><div class="ttdeci">float getConfidence()</div><div class="ttdoc">Get the confidence value. </div><div class="ttdef"><b>Definition:</b> <a href="../../de/de7/TruthValue_8java_source.html#l00069">TruthValue.java:69</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a22620614c797410623291399bae01a0b_a22620614c797410623291399bae01a0b_cgraph.svg" width="530" height="220"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
</p>

<p><div id="dynsection-1" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-1-trigger" src="../../closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-1-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-1-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a22620614c797410623291399bae01a0b_a22620614c797410623291399bae01a0b_icgraph.svg" width="100%" height="437"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../d7/d81/namespacenars.html">nars</a></li><li class="navelem"><a class="el" href="../../d9/d79/namespacenars_1_1inference.html">inference</a></li><li class="navelem"><a class="el" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions.html">TruthFunctions</a></li>
    <li class="footer">Generated on Sun Jan 10 2016 18:03:59 for opennars by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.9.1 </li>
  </ul>
</div>
</body>
</html>
